//
//  ViewController.m
//  GYCustomHUD
//
//  Created by zgy on 2025/5/6.
//

#import "ViewController.h"
#import "GYCustomHUD.h"
#import "GYActivityIndicatorView.h"


@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    

}


- (IBAction)handleShowLoadingClick
{
    
//    [GYCustomHUD showMessage:@"阿萨法古往今来"];
//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.8 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//        [GYCustomHUD showMessage:@"阿萨法古往今来2222"];
//    });
//    
//    [GYCustomHUD hideHUDWithDelay:5];
//    
//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//        [GYCustomHUD showMessage:@"55555"];
//    });
//    
    
    
    
    
    
    [GYCustomHUD showLoading];
    [GYCustomHUD hideHUDWithDelay:2];
//
//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//        [GYCustomHUD showLoadingWithText:nil];
//    });
//    
//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//        [GYCustomHUD showLoadingWithText:@"哈哈哈哈"];
//    });
//    
//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//        [GYCustomHUD showMessage:@"阿萨法古往今来"];
//    });
//    
//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4.4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//        [GYCustomHUD showLoading];
//    });
//    
//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//        [GYCustomHUD showLoadingWithText:@"dsfsnsgj"];
//    });
//    
////    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(6.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
////        [GYCustomHUD showMessage:@"1111111"];
////    });
//    
//    
//    
////    [GYCustomHUD showLoadingWithText:nil];
//    
//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(6.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//        [GYCustomHUD hideHUDWithDelay:2];
//    });
//    
}

- (IBAction)handleShowMsgClick
{
//    [GYCustomHUD showMessage:@"时代峰峻山东龙口"];
    
    GYActivityIndicatorView *indicator = [[GYActivityIndicatorView alloc] initWithFrame:CGRectMake(50, 50, 30, 30)];
//    indicator.layer.borderColor = [UIColor redColor].CGColor;
//    indicator.layer.borderWidth = 1.0;
    indicator.backgroundColor = [UIColor grayColor];
    [self.view addSubview:indicator];
    [indicator startAnimating];
}

- (IBAction)handleHideClick
{
    [GYCustomHUD hideHUD];
}



@end
